package com.sprouting.ops.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.sprouting.ops.annotations.invoke.CheckIsNullOrEmpty;
import com.sprouting.ops.annotations.invoke.CheckLength;
import com.sprouting.ops.annotations.invoke.CheckNotNull;
import com.sprouting.ops.interfaces.AddGroup;
import com.sprouting.ops.interfaces.UpdGroup;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * 环境账号访问信息(OpsEnvAccount)(OPS_ENV_ACCOUNT) 表实体类
 *
 * @author ：lx（长沙麓谷）
 * @date 创建时间：2025-09-08 16:07:37
 */
@Data
@TableName("ops_env_account")
public class OpsEnvAccount extends BaseModel {

    /**
     * 主键
     */
    @CheckNotNull(message = "非法ID", groups = UpdGroup.class)
    @CheckIsNullOrEmpty(message = "无效ID", groups = AddGroup.class)
    private String id;
    /**
     * 场所id
     * @see OpsSite#getId()
     */
    @CheckNotNull(message = "请选择场所")
    private String siteId;
    /**
     * 名称,比如权限系统账号
     */
    @CheckLength(min = 1, max = 255, message = "名称超过长度限制")
    @CheckNotNull(message = "请输入名称")
    private String name;
    /**
     * 账号类型-字典
     * @see OpsSysDict#getId()
     */
    @CheckNotNull(message = "请选择类型")
    private String type;
    /**
     * 重要性，特权，管理员，普通
     * @see com.sprouting.ops.interfaces.ConstantBase.EnvAccountPeculiar
     */
    private Integer userPeculiar;
    /**
     * 绑定id
     * @see OpsEnv#getId()
     * @see OpsSite#getId()
     * @see OpsComponent#getId()
     * @see OpsTool#getId()
     * @see OpsApp#getId()
     */
    @CheckNotNull(message = "请选择绑定信息")
    private String bindId;
    /**
     * 绑定类型，工具、组件、应用、环境
     * @see com.sprouting.ops.interfaces.ConstantBase.EnvAccountBindType
     */
    @NotNull(message = "请选择绑定类型")
    private Integer bindType;
    /**
     * 账号
     */
    @CheckLength(max = 150, message = "账号超过长度限制")
    private String userName;
    /**
     * 密码1
     */
    @CheckLength(max = 150, message = "密码1超过长度限制")
    private String userPassword1;
    /**
     * 密码2
     */
    @CheckLength(max = 150, message = "密码2超过长度限制")
    private String userPassword2;
    /**
     * 密码3
     */
    @CheckLength(max = 150, message = "密码3超过长度限制")
    private String userPassword3;
    /**
     * 网址1
     */
    @CheckLength(max = 255, message = "网址1超过长度限制")
    private String webUrl1;
    /**
     * 网址2
     */
    @CheckLength(max = 255, message = "网址2超过长度限制")
    private String webUrl2;
    /**
     * 详情
     */
    private String briefIntroduction;

}
